package br.com.monitor.gui;

import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;
import javax.swing.GroupLayout;

public class FormularioInicial extends javax.swing.JPanel {
	// Componentes do painel inicial do programa
	private JPanel painelInicial;
	private JPasswordField jPasswordDoLoginDoUsuario;
	private JTextField jTextDoLoginDoUsuario;
	private JLabel labelLoginDoUsuario;
	private JLabel labelSenhaDoUsuario;
	
	public FormularioInicial() {
		instanciaComponentes();
	}
	
	private void instanciaComponentes() {
		painelInicial = new JPanel();
		
		jPasswordDoLoginDoUsuario = new JPasswordField();
		jTextDoLoginDoUsuario = new JTextField();
		labelLoginDoUsuario = new JLabel();
		labelSenhaDoUsuario = new JLabel();
		
		//painelInicial.add(labelLoginDoUsuario, jTextDoLoginDoUsuario);
		//painelInicial.add(labelSenhaDoUsuario, jPasswordDoLoginDoUsuario);
		
		painelInicial = new JPanel();
		jPasswordDoLoginDoUsuario = new JPasswordField();
		jTextDoLoginDoUsuario = new JTextField();
		labelLoginDoUsuario = new JLabel();
		labelSenhaDoUsuario = new JLabel();
		
		labelLoginDoUsuario.setText("Login");
		labelSenhaDoUsuario.setText("Senha");
		
		GroupLayout painelCadastroLayout = new GroupLayout(painelInicial);
		painelInicial.setLayout(painelCadastroLayout);
	    
		painelCadastroLayout.setHorizontalGroup(
	            painelCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
	            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, painelCadastroLayout.createSequentialGroup()
	                .addGap(0, 216, Short.MAX_VALUE)
	                .addGroup(painelCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
	                    .addComponent(labelLoginDoUsuario)
	                    .addComponent(labelSenhaDoUsuario))
	                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
	                .addGroup(painelCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
	                    .addComponent(jPasswordDoLoginDoUsuario)
	                    .addComponent(jTextDoLoginDoUsuario, javax.swing.GroupLayout.DEFAULT_SIZE, 124, Short.MAX_VALUE)))
	    );
	        
		painelCadastroLayout.setVerticalGroup(
	            painelCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
	            .addGroup(painelCadastroLayout.createSequentialGroup()
	                .addGap(7, 7, 7)
	                .addGroup(painelCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
	                    .addComponent(jTextDoLoginDoUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
	                    .addComponent(labelLoginDoUsuario))
	                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
	                .addGroup(painelCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
	                    .addComponent(jPasswordDoLoginDoUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
	                    .addComponent(labelSenhaDoUsuario))
	                .addContainerGap(245, Short.MAX_VALUE))
	    );

		javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
	        this.setLayout(layout);
	        layout.setHorizontalGroup(
	            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
	            .addGroup(layout.createSequentialGroup()
	                .addContainerGap()
	                .addComponent(painelInicial, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
	                .addContainerGap())
	        );
	        layout.setVerticalGroup(
	            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
	            .addGroup(layout.createSequentialGroup()
	                .addContainerGap()
	                .addComponent(painelInicial, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
	                .addContainerGap())
	        );
		painelInicial.setVisible(true);
	}
	
}